﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<base target="_top" />
<title></title>
<style type="text/css">
@import url({site.Dir}user/otherfiles/css/style.css);
#ucmenu{width:400px;z-index:180;top:20px;border: 1px solid #AFD4FF;}
#ucmenu li{width:100px;}
#ucmenu li a{padding:2px 0px;}
</style>
<script type="text/javascript" src="{site.Dir}_data/SysConfig.js"></script>
<script type="text/javascript" src="{site.Dir}_libs/jquery-min.js"></script>
<script type="text/javascript" src="{site.Dir}scripts/jumbotcms.js?v4"></script>
<link type="text/css" rel="stylesheet" href="{site.Dir}style/global.css" />
<script type="text/javascript" src="{site.Dir}_libs/jquery.cookie.js"></script>
<script type="text/javascript" src="{site.Dir}_libs/jquery.form.js"></script>
<script type="text/javascript">
(function(){
	$(document).ready(function() {
		$.ajax({
			type:		"get",
			dataType:	"json",
			data:		"time="+(new Date().getTime()),
			url:		site.Dir + "ajax/user.aspx?oper=ajaxUserInfo",
			error:		function(XmlHttpRequest,textStatus, errorThrown){if(XmlHttpRequest.responseText!=""){alert(XmlHttpRequest.responseText);}},
			success:	function(data){
				//数据绑定
				$(".loginName").html(data.username);
				if(data.adminid!="0") $("#li_admin").show();
				$("#u_myface").attr("src","{site.Dir}avatar/"+data.userid+"_m.jpg?" + (new Date().getTime()));
				ajaxRefresh();  
			}
		});
	});
	//退出登陆
	JumbotCms.UserLogout = function(){
		$.ajax({
			type:		"get",
			dataType:	"json",
			data:		"time="+(new Date().getTime()),
			url:		site.Dir + "ajax/user.aspx?oper=ajaxUserInfo",
			error:		function(XmlHttpRequest,textStatus, errorThrown){if(XmlHttpRequest.responseText!=""){alert(XmlHttpRequest.responseText);}},
			success:	function(data){
				top.location.href='{site.LogoutUrl}?refer={site.LoginUrl}&userkey='+data.userkey;
			}
		});
	}
  
})();
function ajaxRefresh() {
	$.ajax({
		type:		"get",
		dataType:	"json",
		data:		"time="+(new Date().getTime()),
		url:		site.Dir + "user/pmlist/ajax.aspx?oper=newlist",
		success:	function(data){
			if(data.result == "1")
				$(".newpm").html("短消息("+data.returnval+"条未读)");
			else
			{
				$(".newpm").html("短消息");
				//setTimeout(ajaxRefresh, 30000);
			}
						
		}
	});
	$.ajax({
		type:		"get",
		dataType:	"json",
		data:		"time="+(new Date().getTime()),
		url:		"../notice/ajax.aspx?oper=newlist",
		success:	function(data){
			if(data.result == "1"){
				$(".notify").show();	
				$(".newnotice").html(data.returnval+"条新通知");	
			}			
		}
	});
} 
</script>
</head>
<body>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div id="header">
	<div class="headerwarp">
		<h1 class="logo"><a href="{site.Dir}user/index/index.aspx"><img src="{site.Dir}user/otherfiles/image/logo.gif" alt="个人中心" /></a></h1>
		<ul class="menu">
			<li><a href="{site.Dir}customer/index/index.aspx?mod=customer">我是会员</a></li>
			<li><a href="{site.Dir}user/pmlist/index.aspx" class="newpm">短消息</a></li>
			<li class="notify" style="display:none;"><a href="../notice/index.aspx" class="newnotice"></a></li>
			<li id="li_admin" style="display:none;"><a href="{site.Dir}admin/login.htm" target="_blank">管理中心</a></li>
			<li><a href="{site.Dir}user/forum/index.aspx" target="_blank">交流论坛</a></li>
		</ul>
		<div class="nav_account"> <a class="login_thumb"><img id="u_myface" src="{site.Dir}avatar/0_m.jpg" onerror="this.src='{site.Dir}avatar/0_m.jpg'" width="20" height="20" /></a> <a class="loginName"></a> <br />
			<a href="{site.Dir}user/changeprofile">设置</a> | <a href="{site.Dir}">返回首页</a> | <a href="javascript:void(0);" onclick="JumbotCms.UserLogout()">退出</a> </div>
	</div>
</div>
<script >
<!--
function subop(obj){

var tLeft = obj.offsetLeft;
var tTop = obj.offsetTop + 28;
while(obj=obj.offsetParent) {
tLeft+=obj.offsetLeft;
tTop+=obj.offsetTop;
}
if($('ucmenu').style.display == 'none'){
$('ucmenu').style.cssText = 'display:block; left:' + tLeft + 'px; top:' + tTop + 'px;';
}
else{
$('ucmenu').style.cssText = 'display:none;';
}
}
-->
</script>
